package com.fyb.middleware.db.router.dynamic;

import com.fyb.middleware.db.router.DBContextHolder;
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * @Author：MR.FANG
 * @name：DynamicDataSource
 * @Date：2025/6/10 下午1:54
 */
public class DynamicDataSource extends AbstractRoutingDataSource {
    @Override
    protected Object determineCurrentLookupKey() {
        return "db" + DBContextHolder.getDBKey();
    }
}
